/**
 * Copyright 2012 Fonfon.Xen
 * All rights reserved.
 * 
 * @project 
 * @author Xen
 * @version 1.0
 * @data 2012-5-14
 */
package com.guidecaptain.java.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.guidecaptain.core.base.action.BaseAction;
import com.guidecaptain.java.model.vo.LocationVO;
import com.guidecaptain.java.service.LocationService;

/**
 * @author Xen
 * 
 */
@Controller
@Scope("prototype")
public class LocationAction extends BaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Autowired
	private LocationService locationService;

	private LocationVO locationVO = new LocationVO();

	public String insertLocation() {
		locationService.insertLocation(locationVO);

		return "insert";
	}

	public String locationList() {
		locationVO.setLocationList(locationService.queryLocation(locationVO));

		return "list";
	}

	/**
	 * @param
	 * @return
	 */
	@Override
	public Object getModel() {

		return locationVO;
	}

}
